package com.lihao.baselibrary.base;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;

import org.xutils.http.RequestParams;

@SuppressLint("CommitPrefEdits")
public class ColumValue {

	private SharedPreferences sp;
	private SharedPreferences.Editor editor;

	public ColumValue(Context context) {
		sp = context.getSharedPreferences("leSyndrome_personal", Context.MODE_PRIVATE);
		editor = sp.edit();
	}

	//是否登录
	public boolean getIsLogin() {

		return sp.getBoolean("islogin", false);
	}
	public void setIsLogin(boolean islogin) {
		editor.putBoolean("islogin", islogin);
		editor.commit();
	}


	//手机号码
	public void setPhone(String phone){
		editor.putString("phone",phone);
		editor.commit();
	}
	public  String getPhone(){
		return sp.getString("phone","");
	}


	//Token
	public void setToken(String token){
		editor.putString("token",token);
		editor.commit();
	}
	public  String getToken(){
		return sp.getString("token","");
	}



	//昵称
	public void setUserName(String UserName){
		editor.putString("UserName",UserName);
		editor.commit();
	}
	public  String getUserNmae(){
		return sp.getString("UserName","");
	}

	//头像
	public void setHeadImg(String headImg){
		editor.putString("headImg",headImg);
		editor.commit();
	}
	public  String getheadImg(){
		return sp.getString("headImg","");
	}






}
